home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14868 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: news.nyu.edu!schonberg!dewar
  2. From: dewar@cs.nyu.edu (Robert Dewar)
  3. Newsgroups: comp.lang.ada,comp.lang.c++
  4. Subject: Re: some questions re. Ada/GNAT from a C++/GCC user
  5. Date: 2 Apr 1996 07:24:29 -0500
  6. Organization: Courant Institute of Mathematical Sciences
  7. Message-ID: <dewar.828447715@schonberg>
  8. References: <wnewmanDoxrCp.DKv@netcom.com> <SIMON.96Mar30153124@pogner.demon.co.uk> <315D902C.6F7B@escmail.orl.mmc.com> <Dp3G4u.KEA@world.std.com> <4jmuj5$lkh@dayuc.dayton.saic.com> <315F4A9D.7E6F@mcs.com> <4jq4vd$2s5@ferrari.NetXpress.com>
  9. NNTP-Posting-Host: schonberg.cs.nyu.edu
  10. X-Newsreader: NN version 6.5.0 (NOV)
  11.  
  12. Glenn said:
  13.  
  14. >Most folks that responded to this missed something.  That it is simply
  15. >easier to parse source code that has all of the declarations in one
  16. >section while building a symbol table.  They're all there in a group,
  17. >bundled together like in Pascal, making it much simpler to identify
  18. >them and enter them in the symbol table.
  19.  
  20. That's simply a misconception. For correct programs, there is obviously
  21. no difference in the two cases from a compiler's point of view.
  22.  
  23. For error recovery, the Pascal/Ada conventions are harder work for the
  24. compiler, because it has to try hard to identify the proper breakpoint
  25. between declarations and statements in mangled programs. If it gets
  26. confused on this point, you can get a lot of junk cascaded errors.
  27.  
  28. If you have not written a compiler, you often find that your intuitions
  29. as to what might or might not help a compiler implementation are quite
  30. wrong. Even if you DO know a lot about compilers, you can find yourself
  31. surprised. There were restrictions in Ada 83 that were supposed to make
  32. life easier for the compier, but had exactly the opposite effect (e.g.,
  33. for most compilers, the restrictoin on subunit names, now removed in
  34. Ada 95).
  35.  
  36.